﻿package mortal.game.view.task.guild
{
    import extend.language.*;
    import flash.events.*;
    import mortal.game.manager.*;
    import mortal.game.manager.msgTip.*;
    import mortal.game.mvc.*;
    import mortal.game.resource.*;
    import mortal.game.view.common.*;

    public class GuildDoubleRewardHintIcon extends ActionBaseIcon
    {
        private static var _instance:GuildDoubleRewardHintIcon;

        public function GuildDoubleRewardHintIcon(param1:String)
        {
            super(ResFileConst.GuildTaskDoubleRewardIcon);
            return;
        }// end function

        override public function setLeftTimeAndState(param1:int, param2:int = 1, param3:String = "mm:ss", param4:Boolean = true) : void
        {
            super.setLeftTimeAndState(param1, param2);
            if (_state == ActionBaseIcon.State_Opening)
            {
                playEffect();
            }
            else
            {
                stopEffect();
            }
            return;
        }// end function

        override protected function clickHandler(event:MouseEvent) : void
        {
            if (_state == ActionBaseIcon.State_ToBeOpen)
            {
                MsgManager.showRollTipsMsg(Language.getStringByParam(21170, currentTimeStr), MsgRollTipsType.msgRollTips3);
                return;
            }
            super.clickHandler(event);
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            this.disEventName = EventName.GuildTaskDoubleRewardViewShow;
            return;
        }// end function

        public static function get instance() : GuildDoubleRewardHintIcon
        {
            if (_instance == null)
            {
                _instance = new GuildDoubleRewardHintIcon(null);
            }
            return _instance;
        }// end function

    }
}
